﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LibNiconico.NiconicoApi.Internal;
using LibNiconico.NiconicoApi.Extentions;

namespace LibNiconico.NiconicoApi.Videos.WayBackKey
{
    /// <summary>
    /// ニコニコ動画過去コメント取得レスポンス
    /// </summary>
    public sealed class NicoVideoGetWayBackKeyResponse
    {
        /// <summary>
        /// 過去コメント取得キー
        /// </summary>
        public string WayBackKey;

        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="querys"></param>
        public NicoVideoGetWayBackKeyResponse(QueryStrings querys)
        {
            WayBackKey = "";
        }

        /// <summary>
        /// 問い合わせ文字列を解析し、レスポンスを生成
        /// </summary>
        /// <param name="queryString"></param>
        /// <returns></returns>
        public static NicoVideoGetWayBackKeyResponse Parse(QueryStrings queryString)
        {
            NicoVideoGetWayBackKeyResponse res = new NicoVideoGetWayBackKeyResponse(queryString);
            res.WayBackKey = queryString["waybackkey"] ?? "";

            return res;
        }
    }
}
